All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.security.acl.GroupImpl

java.lang.Object
   |
   +----sun.security.acl.GroupImpl

public class GroupImpl
extends Object
implements Group
This class implements a group of principals.


Constructor Index

 o GroupImpl(String)
Constructs a Group object with no members.

Method Index

 o addMember(Principal)
adds the specified member to the group.
 o equals(Group)
This function returns true if the group passed matches the group represented in this interface.
 o getName()
return the name of the principal.
 o hashCode()
return a hashcode for the principal.
 o isMember(Principal)
returns true if the passed principal is a member of the group.
 o members()
returns the enumeration of the members in the group.
 o removeMember(Principal)
removes the specified member from the group.
 o toString()
Prints a stringified version of the group.

Constructors

 o GroupImpl
 public GroupImpl(String groupName)
Constructs a Group object with no members.

Parameters:
groupName - the name of the group

Methods

 o addMember
 public boolean addMember(Principal user)
adds the specified member to the group.

Parameters:
user - The principal to add to the group.
Returns:
true if the member was added - false if the member could not be added.
 o removeMember
 public boolean removeMember(Principal user)
removes the specified member from the group.

Parameters:
user - The principal to remove from the group.
true - if the principal was removed false if the principal was not a member
 o members
 public Enumeration members()
returns the enumeration of the members in the group.

 o equals
 public boolean equals(Group another)
This function returns true if the group passed matches the group represented in this interface.

Parameters:
another - The group to compare this group to.
 o toString
 public String toString()
Prints a stringified version of the group.

Overrides:
toString in class Object
 o hashCode
 public int hashCode()
return a hashcode for the principal.

Overrides:
hashCode in class Object
 o isMember
 public boolean isMember(Principal member)
returns true if the passed principal is a member of the group.

Parameters:
member - The principal whose membership must be checked for.
Returns:
true if the principal is a member of this group, false otherwise
 o getName
 public String getName()
return the name of the principal.


All Packages  Class Hierarchy  This Package  Previous  Next  Index